package com.itheima.demo06.trycatch;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo02JDK7 {
    public static void main(String[] args) {
        try (
                FileInputStream fis = new FileInputStream("day08_FileAndRecursion\\1.jpg");
                FileOutputStream fos = new FileOutputStream("day09_IOAndProperties\\1.jpg");
        ) {
            int len = 0;
            while ((len = fis.read()) != -1) {
                fos.write(len);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
